﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spring.Context;

namespace ClassContainer
{
    public static class Container
    {
        private static IApplicationContext _context;

        static Container()
        {
            _context = Spring.Context.Support.ContextRegistry.GetContext();
        }

        public static IApplicationContext Context
        {
            get
            {
                return _context;
            }
        }

        public static object GetObject(string name)
        {
            if (!string.IsNullOrEmpty(name))
            {
                return _context.GetObject(name);
            }
            return null;
        }
    }
}
